home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Magazin/MacEasy 40
/
Mac Magazin and MacEasy Magazine CD - Issue 40.iso
/
Software
/
Entwickler
/
Fantasm™5 Demo
/
Fantasm 5
/
Anvil
/
Anvil.rsrc
/
EdHl_500_DIRECTIVES ref.
< prev
next >
Wrap
Text File
|
1997-11-09
|
8KB
|
174 lines
Fantasm 5 directives and in-built variables
———————————————————————————————————————————
Revision 3. Copyright © Lightsoft 1997.
Directives
——————————
DC.B, DC.W, DC.L,DCOFF DEFINE CONSTANTS - 68k
DS.B, DS.W, DS.L DEFINE SPACE - 68k
DC.B,DC.H,DC.W DEFINE CONSTANTS - PPC
DS.B,DS.H,DS.W,DS.D DEFINE SPACE - PPC
DF.S, DF.D DEFINE FLOATING POINT DATA - PPC
DFSIN.S, DFSIN.D DEFINE FLOATING POINT SIN (DEGREES) - PPC
DATA EXPLICIT DATA SECTION LABEL DEFINITION - PPC.
CSTRING DEFINE DATA AS A "C" TYPE STRING
PSTRING DEFINE DATA AS A PASCAL TYPE STRING
SECTION {NAME} DEFINE A NEW NAME SPACE FOR LOCAL LABELS.
EQU EQUATE A CONSTANT TO A LABEL
SET SET A LABEL TO A VALUE
REQU, REG EQUATE A LABEL TO A REGISTER
RSRESET, RS.B, RS.W GENERATE POSITIVE OFFSETS FROM ZERO (USED FOR BSS IN PPC)
RS.L
EVEN MAKE PC ADDRESS EVEN (MAINTAINED FOR BACKWARD COMPATIBILTY)
ALIGN {2,4,8} MAKE PC OR DATA ALIGNED
RS_ALIGN {2,4,8,32,64,256}
MAKE THE RS COUNTER ALIGNED TO THE OPERAND
RS_AUTO_ALIGN {on,off} MAKE THE RS COUNTER 8 ALIGNED AFTER EVERY RS DIRECTIVE.
GLOBRESET, GLOBOFF.B A5 GLOBAL OFFSETS - 68K
GLOBOFF.W, GLOBOFF.L
IF,IFNE, IFEQ, IFLT, CONDITIONAL ASSEMBLY (NESTS TO 65536 LEVELS)
IFLE,IFGT, IFGE, IFD,
IFND,IFC, IFNC, ELSE,
ENDC, ENDIF
REPEAT, UNTIL_GT, CONDITIONAL ASSEMBLY LOOP STRUCTURE (DOES NOT NEST)
UNTIL_GE, UNTIL_EQ,
UNTIL_NE, UNTIL_LT,
UNTIL_LE
DEF, XDEF, GLOBAL,PUBLIC DEFINE A LABEL AS BEING GLOBAL (ACCESIBLE TO OTHER FILES IN
THE PROJECT)
REF, XREF, EXTERN DEFINE A LABEL AS BEING IN AN EXTERNAL FILE
EXTERN_DATA DEFINE A DATA LABEL AS EXTERNAL - PPC.
TOC_ROUTINE DEFINE A LABEL AS BEING A CODE POINTER IN THE TOC - PPC
TITLE, INPUT, OUTPUT SETUP LIBRARIAN INFO FIELDS
ENTRY TELLS SYSTEM WHERE THE PROGRAM EXECUTION STARTS (MANDATORY)
PROC_68K, PROC_PPC SET WHICH ASSEMBLER IS IN USE
TRON, TROFF TRACE TO LOG ON/OFF
DEBUG CALL THE DEBUGGER AT THIS POINT IN THE PROGRAM - 68K
Debug POWERPC MACRO EMULATES 68K DEBUG DIRECTIVE.
INCBIN INCLUDE A BINARY FILE AT CURRENT PC
INCLUDE INCLUDE A FILE FROM _SRCINCS AREA
INCLUDEH INCLUDE A FILE FROM THE "ANVIL LOW LEVEL DEFS" FOLDER
FAIL {"report string"} STOP ASSEMBLY IMMEDIATELY
MACRO ,ENDM MACRO DEFINITIONS (NESTS TO 24 LEVELS)
EQU$ ASSIGN A STRING TO A STRING VARIABLE [A$] THROUGH [Z$]
LEFT$ STRING SLICING
MID$ STRING SLICING
RIGHT$ STRING SLICING
CONCAT$ STRING ADDITION
LEN LENGTH OF A STRING
BIN$ CONVERT AN IDENTIFIER TO A STRING AS A 32 BIT BINARY NUMBER.
STR$ CONVERT AN IDENTIFIER TO A STRING AS A DECIMAL NUMBER.
CHR$ CONVERT AN IDENTIFIER TO A CHARACTER.
CLRLOG CLEARS THE LOG WINDOW (DOES NOT DELETE ANY TEXT IN THE LOG)
GOTOXY MOVES LOG PRINTING COORDINATES TO X,Y (PIXEL COORDINATES)
PRINT PRINTS A STRING AT THE CURRENT PRINTING POSITION IN THE LOG WINDOW.
(STRING IS NOT RECORDED IN LOG BUFFER, THIS DIRECTIVE SIMPLY PRINTS THE
STRING IN THE LOG WINDOWS PORT)
PRINTLOG SENDS A STRING TO THE LOG WINDOW. APPENDS A CR CHARACTER TO THE STRING.
(STRING IS RECORDED IN LOG BUFFER)
PAUSE WAITS FOR A KEY PRESS.
BEEP PLAYS A BEEP SOUND USING A_PLAY_SOUND
SWG_OFF STALL WARNING GENERATOR OFF (PPC)
SWG_LOW STALL WARNING GENERATOR SENSITIVITY TO LOW
SWG_MED STALL WARNING GENERATOR SENSITIVITY TO MEDIUM
SWG_HIGH STALL WARNING GENERATOR SENSITIVITY TO HIGH (REAL PROCESSOR EMULATION)
In-built variables
——————————————————
All in-built variables are used as normal labels, for example:
which_pass?: set pass
narg - returns number of parameters passed to a macro.
rssz - returns current value of RS counter as a positive value.
gbsz - returns current value of the globoff counter as a negative value.
true - returns -1 (all bits set)
false - returns 0 (all bits cleared)
life - returns the meaning of life.
pass - returns 1 if pass 1 or 2 if pass 2.
m_bn - returns state of mouse button, 0 if up and 1 if down.
m_rx - returns mouse x coordinate relative to log window.
m_ry - returns mouse y coordinate relative to log window.
lt - returns 0
gt - returns 1
eq - returns 2
so - returns 3
un - returns 3
cr0 - returns 0
cr1 - returns 1
cr2 - returns 2
cr3 - returns 3
cr4 - returns 4
cr5 - returns 5
cr6 - returns 6
cr7 - returns 7
In-built string variables
—————————————————————————
All internal string variables are surrounded by square brackets “[]”.
String variables replace themselves with their respective contents and can appear in fields 2 and 3 only.
[ukdate$] - replaces itself with the current date as a string in the format of “ddmmyy”
[usdate$] - replaces itself with the current data as a string in the format “mmddyy”
[day$] - replaces itself day of month as a two digit string with leading zero suppressed.
[month$] - replaces itself current month as 2 digit numerical string with leading zero suppression.
[year$] - replaces itself 2 digit year string with no leading zero suppression. i.e. “97”
[longyear$] - replaces itself four digit year string. i.e. “1997”
[time$] - replaces itself with the current local time as a string in the format of “hhmm”
[time_with_secs$] - replaces itself with the local time as a string in the format of “hhmmss”
[hour$] - replaces itself with two digit hour string with leading zero suppressed.
[minutes$] - replaces itself with 2 digit minute with no leading zero suppression.
[seconds$] - replaces itself 2 digit seconds with no leading zero suppression.
[build$] - replaces itself with the build number which is incremented by 1 for every good build
of a project. Maximum value is 9999999. If this value is reached the counter resets
to 0 and carries on from there.
[pi$] - replaces itself with 3.14159265358979.
[vers$] - replaces itself with Fantasm’s version.
[A$] - [Z$] - 26 internal user strings. Use with the string manipulation directives -
EQU$, LEFT$, MID$, RIGHT$, CONCAT$, LEN and STR$.
Each string limited to 255 characters in length. The identifier is case insensitive; that is
[P$] is the same as [p$] as far as Fantasm is concerned. See 2-2 for details.
Examples:
[C$] equ$ "Hello" *make C$=”Hello”
[A$]: equ$ [B$] *copy B$ to A$
fred: str$ [hours$] *make fred = hours$ as a number.
fred: len [M$] *make fred = length of the string in M$.
[E$] right$ [ukdate$],2 *make E$= current year as a 2 digit string
a: len "fred" *a will become 4, not 6.
Please see LSA0040 for full details.
Updated 7th September 1997.
End of file.